/**
 * Copyright (c) 2018, wuyy All rights reserved.
 * wuyy 专有/保密源代码,未经许可禁止任何人通过任何渠道使用、修改源代码.
 * QQ:16349023
 * 项目名称 : com.wy2.eclipse.tool.lib
 * @version V1.0
 */
package com.wy2.eclipse.tool.lib.entity;

/**
 * @author wuyy<16349023@qq.com>
 * @date 2018年1月24日下午8:43:29
 * 
 */
public enum TemplateType {

    None(-1,"none","未知"),
    Code(0,"code","代码模板"),
    project(1,"project","项目模板");
    
    private final int typeId;
    private final String typeCode;
    private final String typeName;
    
    
    private TemplateType(int typeId, String typeCode, String typeName) {
        this.typeId = typeId;
        this.typeCode = typeCode;
        this.typeName = typeName;
    }


    public int getTypeId() {
        return typeId;
    }


    public String getTypeCode() {
        return typeCode;
    }


    public String getTypeName() {
        return typeName;
    }
    
    
    public static TemplateType parse(int typeId) {
        for(TemplateType pTypeId : TemplateType.values()) {
            if(pTypeId.getTypeId()==typeId) {
                return pTypeId;
            }
        }
        return TemplateType.None;
    }
    
    
}
